
<?php 
//$linea = '<form name="formulario5" id="form1" method="post" action="historial-Web.php">';
//echo htmlentities($linea);
//'</form> ';
//'<table width="100%" border="0" align="center">';

	//echo $linea;
//$er = "/^(<form)$/";
//$nameForm = array();
//funcion para contar la cantidada de selectores que tiene una pagina
$er = "#<select #i" ;
$lines = file("resultPost");
$selectores = array();
foreach($lines as $lin){
	if( preg_match($er, $lin) )
		$selectores[] =  htmlentities($lin);
}
print_r($selectores);
echo (count($selectores));
/*
$nameForm = htmlentities($nameForm);
$pieces = explode(" ", $nameForm);
print_r($pieces);
for( $i = 0; $i < count($pieces); $i++ ){
	if( preg_match("#name=#", $pieces[$i]) )
		$target = $pieces[$i];
}
$forName = explode("=", $target);
//print_r($forName);
$name = $forName[1];
$noHtml = html_entity_decode($name);
$len = strlen(html_entity_decode($name));
$porfin = substr($noHtml,1,-1);*/












//is good :) Funcion para conocer el nombre de un formulario
/*
$er = "#<form #i" ;
//$er = "#<input #i" ;
$lines = file("resultPost");
foreach($lines as $lin){
	if( preg_match($er, $lin) )
		$nameForm = $lin;
}
$nameForm = htmlentities($nameForm);
$pieces = explode(" ", $nameForm);
print_r($pieces);
for( $i = 0; $i < count($pieces); $i++ ){
	if( preg_match("#name=#", $pieces[$i]) )
		$target = $pieces[$i];
}
$forName = explode("=", $target);
//print_r($forName);
$name = $forName[1];
$noHtml = html_entity_decode($name);
$len = strlen(html_entity_decode($name));
$porfin = substr($noHtml,1,-1);*/
//echo $porfin;	?>
<!--
<script type="text/javascript" src="../jquery-validation-1.9.0/lib/jquery-1.3.2.js" charset="utf-8">
</script>
<script type="text/javascript" src="../jquery-validation-1.9.0/jquery.validate.js" charset="utf-8"></script>
<script type="text/javascript" src="../jquery-validation-1.9.0/additional-methods.js" charset="utf-8">
</script>
<?php echo 
'<script languaje="JavaScript">            
      var varjs="'.$porfin.'";
	 //alert(varjs);
</script>';?> 
<script languaje="JavaScript">        
     
$(document).ready(function(){
$('#contenido').load('resultPost', function() {
        alert('Archivo cargado correctamente');
    });
});

</script>         

<div id="contenido"></div>
<script languaje="JavaScript">
var spans = $('select') ;
alert(spans);
</script>-->
